﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using DTO;
using BUS;


namespace TVC_WEB.Global
{
    public partial class Default : System.Web.UI.Page
    {
        String sErr = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            ProductsControl ctr = new ProductsControl();
            DataTable dt = ctr.GetAllIndex(ref sErr);
            lvPro.DataSource = dt;
            lvPro.DataBind();
        }
        public string GetImage(string imageName)
        {
            string strUploadFolder = "/" + ConfigurationManager.AppSettings["UploadFolder"].ToString() + "Images/";
            return strUploadFolder + imageName;
        }
        public string GetPrice(string imageName)
        {
            return Convert.ToDouble(imageName).ToString("N0") + "đ";
        }
    }
}
